package com.javatest.springbootamqp.config;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author lzy
 * @version v1.0 Create DateTime: 2019/4/23 15:42 @EnableRabbit:开启基于注解的RabbitMQ
 */
@EnableRabbit
@Configuration
public class MyAMQPConfig {

  @Bean
  public MessageConverter messageConverter() {
    return new Jackson2JsonMessageConverter();
  }
}
